<?php
$this->widget('ext.mylib.widgets.Gridview.DGridView', array(
    'id'           => 'product-grid',
    'dataProvider' => $model->search(),
    'htmlOptions' => array('class' => 'hastable'),
    'columnGroup' => array(50,  0, 100, 150, 65, 100, 101),
//    'myPageSize' => 3,
    'columns' => array(
        array(
            'class'       => 'ext.mylib.widgets.Gridview.DIdColumn',
            'htmlOptions' => array('style' => 'text-align: center;'),
        ),
        'project',
        'country',
        array(
            'name'   => 'type_id',
            'header' => $model->getAttributeLabel('type_id'),
            'value'  => 'DNewsletterType::model()->getTypeText($data->type_id)',
        ),
        array(
            'class' => 'ext.mylib.widgets.ActiveColumn.DActiveColumn',
            'name'  => 'activated_flag',
            'url'   => Yii::app()->createUrl('dadmin/product2/toggleActive/id'),
        ),
        array(
            'class'       => 'ext.mylib.widgets.OrderColumn.OrderColumn',
            'header'      => $model->getAttributeLabel('sort_order'),
            'modelClass'  => 'DProduct2',
            'htmlOptions' => array('style' => 'text-align:center'),
        ),
        array(
            'class'       => 'ext.mylib.widgets.Gridview.DButtonColumn',
            'afterDelete' => 'function(){ 
                showMessage("#message", "' . Yii::t('DadminModule.msg', 'deleted') . '"); 
            }',
        ),
    ),
));
?>
<div class="clearfix"></div>